<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:pe="http://primefaces.org/ui/extensions">
    <h:head>
        <title>#{bundle.bilyet}</title>
        <link href="./resources/css/default.css" rel="stylesheet" type="text/css" />
    </h:head>
    <h:body>
        <ui:composition>
            
            <h:form>
                <script type="text/javascript">
                    var doInitForm=false;
                    var tofocus;
                    
                    function setDoInitForm(st) {doInitForm=st;}
                    function changeFocus(nextfcs) {tofocus=nextfcs;}
                    function focusState(xhr, status, args) {  
                       if(args.validationFailed || !args.success) {}
                       else document.getElementById(tofocus).focus();
                       return false;
                    }
                    
                    function handleCompleteSaving(xhr, status, args) {  
                        if(args.validationFailed || !args.success) {
                        }else setTimeout(function() {if (doInitForm==true) btnNewDeposit.jq.click();}, 3000);
                    }
                    
                    function customRK(e, id, nextfcs) {
                      var code = (e.keyCode ? e.keyCode : e.which);
                       if(code==13) {
                            if (id=="bilyetCIF") rcbilyetGetCustomer();
                            else if (id=="bilyetParentNo") rcbilyetGetParent();
                            else if (id=="bilyetSavacnntNo") rcbilyetGetSaving();
                            else if (id=="bilyetSavdepNo") rcbilyetGetSavdep();
                            tofocus=nextfcs;                            
                            e.preventDefault ? e.preventDefault() : e.returnValue = false;
                            e.stopPropagation();
                       }
                    }
                </script>
                
                <p:outputPanel autoUpdate="true">
                <p:toolbar>
                    <p:toolbarGroup align="left">
                        <p:commandButton value="#{bundle.btnNew}" icon="ui-icon-document" action="#{bilyetBean.newData()}" 
                                         update="displayBilyet" process="@this" 
                                         rendered="#{menuBean.cekButtonAccess(201,'INS;')}"
                                         widgetVar="btnNewDeposit" oncomplete="setDoInitForm(false);">
                            <pe:resetEditableValues for="displayBilyet"/>  
                        </p:commandButton>
                        <p:commandButton value="#{bundle.btnSave}" icon="ui-icon-document"  action="#{bilyetBean.trySave()}" 
                                         disabled="#{!bilyetBean.editMode}" update="displayBilyet" 
                                         oncomplete="setDoInitForm(true); handleCompleteSaving(xhr, status, args);" 
                                         rendered="#{menuBean.cekButtonAccess(201,'INS;')}">
                        </p:commandButton> 
                    </p:toolbarGroup>
                    
                    <p:toolbarGroup align="right">
                        <p:commandButton id="doNothingBilyet" type="button" value="" style="width: 0px; height: 0px;"/> 
                         <p:defaultCommand target="doNothingBilyet"/> 
                    </p:toolbarGroup>
                </p:toolbar>
                 </p:outputPanel>    
                    
                <p:remoteCommand name="rcbilyetGetCustomer" actionListener="#{bilyetBean.getBilyetCustomer('null')}" process="bilyetCIF @this" 
                                 update="bilyetCIF" oncomplete="focusState(xhr, status, args);"/>
                <p:remoteCommand name="rcbilyetGetSaving" actionListener="#{bilyetBean.getSavingDest('null')}" process="bilyetSavacnntNo @this" 
                                 update="bilyetAccntOwner" oncomplete="focusState(xhr, status, args);"/>
                <p:remoteCommand name="rcbilyetGetSavdep" actionListener="#{bilyetBean.getSavingDep('null')}" process="bilyetSavdepNo @this" 
                                 update="bilyetSavdepNo bilyetSavdepOwner bilyetSavdepBalance" oncomplete="focusState(xhr, status, args);"/>
                <p:remoteCommand name="rcbilyetGetParent" actionListener="#{bilyetBean.getParentBiltetNo('null')}" process="bilyetParentNo @this" 
                                 update="bilyetParentNo" oncomplete="focusState(xhr, status, args);"/>
                
                
                <h:panelGrid id="displayBilyet" styleClass="addELIT" cellpadding="0" >
                    <h:panelGrid columns="2" rowClasses="panelGridId" >
                        <p:panel header="#{bundle.bilyetLedgend}" >
                            <h:panelGrid columns="3" cellpadding="0" cellspacing="2">
                                <p:outputLabel value= "#{bundle.bilyetNo}" for="bilyetNoBil"/><h:outputLabel value= ":" />
                                <p:inputText value="#{bilyetBean.bilyet.bilyetNo}" style="width: 200px;"
                                        id="bilyetNoBil" label="#{bundle.cif}"
                                        requiredMessage="#{bundle.bilyetNo} #{bundle.requiredInput}"
                                        required="true" disabled="#{!bilyetBean.authorized}">
                                        <p:ajax process="@this" listener="#{bilyetBean.cekBilyeNumber}"/>
                                </p:inputText>
                                
                                <h:outputLabel value= "#{bundle.bilyetDate}" /><h:outputLabel value= ":" />
                                <h:outputText value="#{bilyetBean.bilyet.bilyetDate}" />
                                
                                <p:outputLabel value="#{bundle.deproduct}" for="bilyetProdId"/><h:outputLabel value= ":" />
                                <p:selectOneMenu value="#{bilyetBean.bilyet.deproduct.deproductId}" id="bilyetProdId" label="#{bundle.deproduct}" 
                                            requiredMessage="#{bundle.deproduct} #{bundle.requiredInput}" 
                                            required="true" style="width: 208px;" disabled="#{!bilyetBean.authorized}">
                                        <f:selectItem itemLabel="" itemValue="" />
                                        <f:selectItems value="#{bilyetBean.avblProd}" />
                                        <p:ajax update="bilyetInterestAmount bilyetTaxAmount bilyetglDeposit" listener="#{bilyetBean.handleProdChange}" />  
                                </p:selectOneMenu>
                                
                                <p:outputLabel value= "#{bundle.cif}" for="bilyetCIF" /><h:outputLabel value= ":" />
                                <h:panelGrid columns="2" cellpadding="0" cellspacing="0">
                                    <p:inputText value="#{bilyetBean.bilyet.customer.cif}" style="width: 176px;"
                                        onkeydown="customRK(event, 'bilyetCIF', '#{utilityBean.findClientId('bilyetAro')}')" id="bilyetCIF" label="#{bundle.cif}"
                                        requiredMessage="#{bundle.cif} #{bundle.requiredInput}"
                                        required="true" disabled="#{!bilyetBean.authorized}" />
                                    <p:commandButton icon="ui-icon-search" iconPos="center" styleClass="btnSmall"
                                                     update="displayBilyetLookCIF" onclick="changeFocus('#{utilityBean.findClientId('bilyetAro')}');"
                                                     process="@this" immediate="true" oncomplete="dlgDepLookupCust.show();" disabled="#{!bilyetBean.authorized}">
                                        <f:setPropertyActionListener target="#{bilyetBean.showLookup}" value="#{true}" />
                                    </p:commandButton>
                                </h:panelGrid>
                                                                
                                <h:outputLabel value= "#{bundle.aro}" /><h:outputLabel value= ":" />
                                <p:selectBooleanCheckbox value="#{bilyetBean.bilyet.aro}" id="bilyetAro" style="width: 200px;" disabled="#{!bilyetBean.authorized}"/>

                                <p:outputLabel value= "#{bundle.parentBilyet}" for="bilyetParentNo"/><h:outputLabel value= ":" />
                                <h:panelGrid columns="2" cellpadding="0" cellspacing="0">
                                    <p:inputText value="#{bilyetBean.bilyetParentNo}" style="width: 176px;"
                                        onkeydown="customRK(event, 'bilyetParentNo', '#{utilityBean.findClientId('bilyetPrincipalAmount')}')" id="bilyetParentNo" label="#{bundle.aro}"
                                        requiredMessage="#{bundle.parentBilyet} #{bundle.requiredInput}"
                                        required="false" disabled="#{!bilyetBean.authorized}">
                                    </p:inputText>
                                     <p:commandButton icon="ui-icon-search" iconPos="center" styleClass="btnSmall"
                                                      update="displayBilyetLookBil" onclick="changeFocus('#{utilityBean.findClientId('bilyetPrincipalAmount')}');"
                                        process="@this" immediate="true" oncomplete="dlgBilyetLookupParent.show();" disabled="#{!bilyetBean.authorized}">
                                         <f:setPropertyActionListener target="#{bilyetBean.showLookup}" value="#{true}" />
                                    </p:commandButton>
                                </h:panelGrid>

                                <!--   -->
                                <p:outputLabel value= "#{bundle.amount}" for="bilyetPrincipalAmount" /><h:outputLabel value= ":" />
                                <pe:inputNumber decimalSeparator="." thousandSeparator="," maxValue="99999999999999999999.99" minValue="0" 
                                        styleClass="money" value="#{bilyetBean.bilyet.principleAmount}" required="true"
                                        requiredMessage="#{bundle.amount} #{bundle.requiredInput}" label="#{bundle.amount}"
                                        id="bilyetPrincipalAmount" style="width: 200px; text-align: right;" disabled="#{!bilyetBean.authorized}">
                                        <p:ajax update="bilyetInterestAmount bilyetTaxAmount" process="@this" 
                                                partialSubmit="false" listener="#{bilyetBean.calculateAmount()}"/>
                                </pe:inputNumber>
                                
                                <p:outputLabel value="#{bundle.interestRate}" for="bilyetinterestRate"/><h:outputLabel value= ":" />
                                <pe:inputNumber decimalSeparator="." thousandSeparator="," maxValue="999.99" minValue="0" symbol=" %" symbolPosition="s"
                                        styleClass="percent" value="#{bilyetBean.bilyet.interestRate}" label="#{bundle.interestRate}"
                                        requiredMessage="#{bundle.amount} #{bundle.requiredInput}"
                                        required="true" id="bilyetinterestRate" style="width: 50px; float: right;" disabled="#{!bilyetBean.authorized}">
                                        <p:ajax update="bilyetInterestAmount bilyetTaxAmount" process="@this" 
                                                partialSubmit="false" listener="#{bilyetBean.calculateAmount()}"/>
                                </pe:inputNumber>
                                
                                <p:outputLabel value= "#{bundle.interestAmount}" for="bilyetInterestAmount"/><h:outputLabel value= ":" />
                                <pe:inputNumber decimalSeparator="." thousandSeparator="," maxValue="99999999999999999999.99" minValue="0" 
                                        styleClass="money" value="#{bilyetBean.bilyet.interestAmount}" 
                                        requiredMessage="#{bundle.interestAmount} #{bundle.requiredInput}"
                                        required="true" label="#{bundle.interestAmount}" style="width: 200px; text-align: right;"
                                        id="bilyetInterestAmount" disabled="#{!bilyetBean.authorized}">
                                </pe:inputNumber>
                                
                                <p:outputLabel value= "#{bundle.taxAmount}" for="bilyetTaxAmount" /><h:outputLabel value= ":" />
                                <pe:inputNumber decimalSeparator="." thousandSeparator="," maxValue="99999999999999999999.99" minValue="0" 
                                        styleClass="money" value="#{bilyetBean.bilyet.taxAmount}" 
                                        requiredMessage="#{bundle.taxAmount} #{bundle.requiredInput}"
                                        required="true" label="#{bundle.taxAmount}" style="width: 200px; text-align: right;"
                                        id="bilyetTaxAmount" disabled="#{!bilyetBean.authorized}" />
                                                                
                                <h:outputLabel value= "#{bundle.disbInterestOpt}" /><h:outputLabel value= ":" />
                                <p:selectOneMenu style="width: 208px;" value="#{bilyetBean.bilyet.disbInterestOpt}" label="#{bundle.disbInterestOpt}" disabled="#{!bilyetBean.authorized}">
                                    <f:selectItems value="#{bilyetBean.avblDisb}" />
                                </p:selectOneMenu>
                                
                                <h:outputLabel value= "#{bundle.glDeposit}" /><h:outputLabel value= ":" />
                                <p:selectOneMenu style="width: 208px;" value="#{bilyetBean.depositGlaccnt}" required="true"
                                                 requiredMessage="#{bundle.glDeposit} #{bundle.requiredInput}"
                                                 id="bilyetglDeposit" label="#{bundle.glDeposit}" disabled="#{!bilyetBean.authorized}" var="gl" converter="glaccnt" >
                                    <f:selectItem rendered="#{bilyetBean.depositGlaccnt!=null}" itemLabel="#{bilyetBean.depositGlaccnt.accountName}" itemValue="#{bilyetBean.depositGlaccnt}" />
                                    <f:selectItems value="#{bilyetBean.avblGL}" var="glacc" itemLabel="#{glacc.accountName}" itemValue="#{glacc}" />
                                    <p:column>#{gl.accountNo}</p:column>
                                    <p:column>#{gl.accountName}</p:column>
                                </p:selectOneMenu>
                                                         
                                <p:outputLabel value= "#{bundle.bilyetSavdep}" for="bilyetSavdepNo"/><h:outputLabel value= ":" />
                                <h:panelGrid columns="2" cellpadding="0" cellspacing="0">
                                    <p:inputText value="#{bilyetBean.depSavaccnt}" style="width: 176px;" required="true"
                                        onkeydown="customRK(event, 'bilyetSavdepNo', '#{utilityBean.findClientId('bilyetSavacnntNo')}')" id="bilyetSavdepNo" label="#{bundle.bilyetSavdep}"
                                        requiredMessage="#{bundle.bilyetSavdep} #{bundle.requiredInput}" disabled="#{!bilyetBean.authorized}">
                                        <p:ajax update="bilyetSavdepOwner bilyetSavdepBalance" process="@this"/>
                                    </p:inputText>
                                    
                                    <p:commandButton icon="ui-icon-search" iconPos="center" styleClass="btnSmall"
                                                     update="bilyetSavdepNo bilyetSavdepOwner bilyetSavdepBalance" onclick="changeFocus('#{utilityBean.findClientId('bilyetSavacnntNo')}');"
                                        process="@this" immediate="true" oncomplete="dlgBilyetLookupSavdep.show();" disabled="#{!bilyetBean.authorized}">
                                        <f:setPropertyActionListener target="#{bilyetBean.showLookup}" value="#{true}" />
                                    </p:commandButton>
                                </h:panelGrid>
                                
                                <h:outputLabel value= "#{bundle.ownerAccnt}" /><h:outputLabel value= ":" />
                                <h:outputText value="#{bilyetBean.depSavaccntOwner}" id="bilyetSavdepOwner" />
                                
                                <h:outputLabel value= "#{bundle.balance}" /><h:outputLabel value= ":" />
                                <h:outputText styleClass="numPos" value="#{bilyetBean.saldo}" id="bilyetSavdepBalance" >
                                    <f:convertNumber />
                                </h:outputText>
                                
                                <p:outputLabel value= "#{bundle.bilyetSavaccnt}" for="bilyetSavacnntNo"/><h:outputLabel value= ":" />
                                <h:panelGrid columns="2" cellpadding="0" cellspacing="0">
                                    <p:inputText value="#{bilyetBean.accntDest}" style="width: 176px;" required="true"
                                        onkeydown="customRK(event, 'bilyetSavacnntNo', '#{utilityBean.findClientId('bilyetDisbOtherBankAccno')}')" id="bilyetSavacnntNo" label="#{bundle.bilyetSavaccnt}"
                                        requiredMessage="#{bundle.bilyetSavaccnt} #{bundle.requiredInput}" disabled="#{!bilyetBean.authorized}" />
                                    
                                    <p:commandButton icon="ui-icon-search" iconPos="center" styleClass="btnSmall"
                                                     update="displayBilyetLookSav" onclick="changeFocus('#{utilityBean.findClientId('bilyetDisbOtherBankAccno')}');"
                                        process="@this" immediate="true" oncomplete="dlgBilyetLookupSav.show();" disabled="#{!bilyetBean.authorized}">
                                        <f:setPropertyActionListener target="#{bilyetBean.showLookup}" value="#{true}" />
                                    </p:commandButton>
                                </h:panelGrid>
                                
                                <h:outputLabel value= "#{bundle.ownerAccnt}" /><h:outputLabel value= ":" />
                                <h:outputText value="#{bilyetBean.accntOwner}" id="bilyetAccntOwner" />
                                                                
                                <h:outputLabel value= "#{bundle.disbOtherBankAccno}" /><h:outputLabel value= ":" />
                                <p:inputText value="#{bilyetBean.bilyet.disbOtherBankAccno}" style="width: 200px;" id="bilyetDisbOtherBankAccno"
                                             label="#{bundle.disbOtherBankAccno}" disabled="#{!bilyetBean.authorized}"/>

                                <h:outputLabel value= "#{bundle.disbOtherBankName}" /><h:outputLabel value= ":" />
                                <p:inputText value="#{bilyetBean.bilyet.disbOtherBankName}" style="width: 200px;" label="#{bundle.disbOtherBankName}" disabled="#{!bilyetBean.authorized}"/>

                                <h:outputLabel value= "#{bundle.disbOtherBankBranch}" /><h:outputLabel value= ":" />
                                <p:inputText value="#{bilyetBean.bilyet.disbOtherBankBranch}" style="width: 200px;" label="#{bundle.disbOtherBankBranch}" disabled="#{!bilyetBean.authorized}"/>

                                <h:inputHidden value="#{bilyetBean.bilyet.customer.customerId}" id="hideDepositCustomerId"
                                    required="true" requiredMessage="#{bundle.cif} #{bundle.requiredInput}" />
                                <h:inputHidden />
                                
                            </h:panelGrid>
                        </p:panel>

                        <h:panelGrid columns="1" cellpadding="1" rowClasses="panelGridId" border="0" >
                            <p:panel header="#{bundle.cusledgen}">
                                <p:outputPanel autoUpdate="true">
                                  <h:panelGrid columns="3" cellpadding="0" cellspacing="5">

                                    <h:outputLabel value= "#{bundle.globalName}" /><h:outputLabel value= ":" />
                                    <h:outputText style="padding: 0 75px 0 0;"  value="#{bilyetBean.bilyet.customer.customerName}" />
                                    
                                    <h:outputLabel value= "#{bundle.aliasName}" /><h:outputLabel value= ":" />
                                    <h:outputText rendered="true" value="#{bilyetBean.bilyet.customer.aliasName}" />
                                    
                                    <h:outputLabel value= "#{bundle.phone}" /><h:outputLabel value= ":" />
                                    <h:outputText value="#{bilyetBean.bilyet.customer.phone}"/> 
                                    
                                    <h:outputLabel value= "#{bundle.mobilePhone}" /><h:outputLabel value= ":" />
                                    <h:outputText value="#{bilyetBean.bilyet.customer.mobilePhone}"/>
                                    
                                    <h:outputLabel style="padding: 0 15px 0 0;"  value= "#{bundle.npwp}" /><h:outputLabel value= ":" />
                                    <h:outputText value="#{bilyetBean.bilyet.customer.npwp}" />
                                    
                                    <h:outputLabel style="padding: 0 15px 0 0;"  value= "#{bundle.addressRes}" /><h:outputLabel value= ":" />
                                    <h:outputText value="#{bilyetBean.bilyet.customer.idAddressLine1}" />
                                    
                                    <h:outputLabel value= "#{bundle.specimen}" /><h:outputLabel value=":"/>
                                    <p:graphicImage  value="/upload/personal/#{bilyetBean.bilyet.customer.specimen}" />
                                    
                                </h:panelGrid>
                                </p:outputPanel>
                            </p:panel>
                            
                            <p:panel header="#{bundle.deproduct}" >
                                <p:outputPanel autoUpdate="true">
                                  <h:panelGrid columns="3" cellpadding="0" cellspacing="5">
                                    <h:outputLabel value= "#{bundle.period}" /><h:outputLabel value= ":" />
                                    <h:outputText value="#{constantaBean.getDeptPeriodText(bilyetBean.bilyet.deproduct.periodOpt)}" />

                                    <h:outputLabel value= "#{bundle.numOfPeriod}" /><h:outputLabel value= ":" />
                                    <h:outputText styleClass="alignNum" value="#{bilyetBean.bilyet.deproduct.numOfPeriod}" />
                                </h:panelGrid>
                            </p:outputPanel>        
                            </p:panel>
                        </h:panelGrid>
                        
                    </h:panelGrid>
                </h:panelGrid>
                
                
                <!-- LOOK UP CUSTOMER -->
            <p:dialog header="#{bundle.Select} #{bundle.customer}" widgetVar="dlgDepLookupCust" closable="true" dynamic="true" >
                <p:ajax listener="#{bilyetBean.handleCloseLookup}" />
                <h:panelGrid id="displayBilyetLookCIF" rendered="#{bilyetBean.showLookup==true}">
                    <ui:include src="../master/customer/searchCustomer.xhtml" >
                        <ui:param name="lookupCustComponenId" value="deposit" />
                    </ui:include> 

                    <h:panelGrid cellpadding="0" styleClass="pComBtnSTDR" >
                        <f:facet name="footer">
                        <p:commandButton value="#{bundle.btnOK}" icon="ui-icon-disk" immediate="true" 
                                                process="@this" update="bilyetCIF hideDepositCustomerId"
                                                action="#{bilyetBean.getBilyetCustomer(searchCustomer.selectedData.cif)}" 
                                                oncomplete="dlgDepLookupCust.hide(); focusState(xhr, status, args);" />
                        <p:commandButton value="#{bundle.btnClose}" oncomplete="dlgDepLookupCust.hide()" immediate="true" icon="ui-icon-document" process="@this" />
                        </f:facet>
                    </h:panelGrid>
                </h:panelGrid>
            </p:dialog>
                
            <!-- LOOK UP saving deposite-->
            <p:dialog header="#{bundle.Select} #{bundle.accountNo}" widgetVar="dlgBilyetLookupSavdep" closable="true" dynamic="true" >
                <p:ajax listener="#{bilyetBean.handleCloseLookup}" />
                <h:panelGrid id="displayBilyetLookSavdep" rendered="#{bilyetBean.showLookup==true}">
                
                    <ui:include src="../saving/searchSaving.xhtml" >
                        <ui:param name="lookupSavComponenId" value="bilyet1" />
                    </ui:include> 

                    <h:panelGrid cellpadding="0" styleClass="pComBtnSTDR" >
                        <f:facet name="footer">
                            <p:commandButton value="#{bundle.btnOK}" icon="ui-icon-disk" immediate="true" 
                                             process="@this" update="bilyetSavdepNo bilyetSavdepOwner bilyetSavdepBalance"
                                             action="#{bilyetBean.getSavingDep(searchSavingBean.selectedData.accountNo)}" 
                                             oncomplete="dlgBilyetLookupSavdep.hide(); focusState(xhr, status, args);" />
                            
                            <p:commandButton value="#{bundle.btnClose}" oncomplete="dlgBilyetLookupSavdep.hide()" immediate="true" icon="ui-icon-document" process="@this" />
                        </f:facet>
                    </h:panelGrid>
                </h:panelGrid>    
            </p:dialog>
            
            <!-- LOOK UP saving -->
            <p:dialog header="#{bundle.Select} #{bundle.accountNo}" widgetVar="dlgBilyetLookupSav" closable="true" dynamic="true" >
                <p:ajax listener="#{bilyetBean.handleCloseLookup}" />
                <h:panelGrid id="displayBilyetLookSav" rendered="#{bilyetBean.showLookup==true}">
                
                    <ui:include src="../saving/searchSaving.xhtml" >
                        <ui:param name="lookupSavComponenId" value="bilyet" />
                    </ui:include> 

                    <h:panelGrid cellpadding="0" styleClass="pComBtnSTDR" >
                        <f:facet name="footer">
                            <p:commandButton value="#{bundle.btnOK}" icon="ui-icon-disk" immediate="true" 
                                             process="@this" update="bilyetSavacnntNo bilyetAccntOwner"
                                             action="#{bilyetBean.getSavingDest(searchSavingBean.selectedData.accountNo)}" 
                                             oncomplete="dlgBilyetLookupSav.hide(); focusState(xhr, status, args);" />
                            
                            <p:commandButton value="#{bundle.btnClose}" oncomplete="dlgBilyetLookupSav.hide()" immediate="true" icon="ui-icon-document" process="@this" />
                        </f:facet>
                    </h:panelGrid>
                </h:panelGrid>    
            </p:dialog>
            
            <!-- LOOK UP parent -->
            <p:dialog header="#{bundle.Select} #{bundle.bilyetNo}" widgetVar="dlgBilyetLookupParent" closable="true" dynamic="true" >
                <p:ajax listener="#{bilyetBean.handleCloseLookup}" />
                <h:panelGrid id="displayBilyetLookBil" rendered="#{bilyetBean.showLookup==true}">
                
                    <ui:include src="../term_deposit/searchDeposit.xhtml" >
                        <ui:param name="lookupDepositComponenId" value="bilyet" />
                    </ui:include> 

                    <h:panelGrid cellpadding="0" styleClass="pComBtnSTDR" >
                        <f:facet name="footer">
                            <p:commandButton value="#{bundle.btnOK}" icon="ui-icon-disk" immediate="true" 
                                             process="@this" update="bilyetParentNo"
                                             action="#{bilyetBean.getParentBiltetNo(searchDepositBean.selectedData.bilyetNo)}" 
                                             oncomplete="dlgBilyetLookupParent.hide(); focusState(xhr, status, args);" />
                            
                            <p:commandButton value="#{bundle.btnClose}" oncomplete="dlgBilyetLookupParent.hide()" immediate="true" icon="ui-icon-document" process="@this" />
                        </f:facet>
                    </h:panelGrid>
                </h:panelGrid>
            </p:dialog>
            
            </h:form>
            
        </ui:composition>    
    </h:body>
</html>